package com.hackerrank.challenges.missingnumbers;

import java.util.Scanner;

public class Solution {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt(), A[] = new int[n], min = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++) {
			A[i] = in.nextInt();
			if(A[i] < min)
				min = A[i];
		}
		int m = in.nextInt(), B[] = new int[m];
		for(int i = 0; i < m; i++) {
			B[i] = in.nextInt();
			if(B[i] < min)
				min = B[i];
		}
		int[] c = new int[101];
		for(int i = 0; i < m; i++)
			c[B[i] - min]++;
		for(int i = 0; i < n; i++)
			c[A[i] - min]--;
		for(int i = 0; i < c.length; i++)
			if(c[i] > 0)
				System.out.print((min + i) + " ");
		System.out.println();
	}
}
